package cn.alm.springmvcrestfulcrud.service;

import cn.alm.springmvcrestfulcrud.dao.EmployeeDao;
import cn.alm.springmvcrestfulcrud.entity.Employee;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class EmployeeServiceImpl implements EmployeeService {

    @Resource
    private EmployeeDao employeeDao;
    @Override
    public List<Employee> list() {
        return employeeDao.list();
    }

    @Override
    public Employee getById(Integer id) {
        return employeeDao.get(id);
    }

    @Override
    public Integer add(Employee employee) {
        return employeeDao.add(employee);
    }
}
